<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
	<head>  
		<title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   
    <script language="javascript" src="src.js"></script>

    <script language="javascript">
	function _F(id,value)
	{
		document.getElementById(id).innerHTML = value;
	}
	function _M(id,src,width,height)
	{
		var img = document.getElementById(id);
		img.src = src;
		if(width != undefined)
		{
			 img.width = width;
		}
		if(height != undefined)
		{
			 img.height = height;
		}
	}
	function _P(id,key,value)
	{
		var table = document.getElementById(id);
		var tr  = table.insertRow();
		var td1 = tr.insertCell();
		td1.innerHTML = key;
        var td2 = tr.insertCell();
		td2.innerHTML = value;
	}
	function _C(id,index,color,count)
	{
		var table = document.getElementById(id);
		var tr  = table.insertRow();
		var td1 = tr.insertCell();
		td1.innerHTML = index;
        var td2 = tr.insertCell();
		td2.style.backgroundColor = color;
		var td3 = tr.insertCell();
		td3.innerHTML = color;
		var td4 = tr.insertCell();
		td4.innerHTML = count;
	}
    window.onload=function()
	{
		if(strArg != undefined)
		{
			var i = 0;
			_F("PrjTitle",strArg["title"]);
			_F("CreateTime","生成日期:" + strArg["createTime"]);
			_F("OrginTitle",strArg["title"] + "原图");
			_F("OrignSize","尺寸:" + strArg["orignPic"]["width"]+" X " + strArg["orignPic"]["height"]);
			_M("ImgOrign",strArg["title"] + "_原图.bmp",800,strArg["orignPic"]["height"]*800/strArg["orignPic"]["width"]);
			_F("MixTitle",strArg["title"] + "颜色混合图");
			_F("MixSize","尺寸:" + strArg["mixPic"]["width"]+" X " + strArg["mixPic"]["height"]);
			_M("ImgMix",strArg["title"] + "_颜色混合图.bmp",400,strArg["mixPic"]["height"]*400/strArg["mixPic"]["width"]);
			_F("BottomTitle",strArg["title"] + "底图");
			_P("ParamList","像素尺寸",strArg["bottomPic"]["pixWidth"] + " X " + strArg["bottomPic"]["pixHeight"]);
			_P("ParamList","像素元",strArg["bottomPic"]["pixCell"]);
			_P("ParamList","框架尺寸",strArg["bottomPic"]["width"] + " X " + strArg["bottomPic"]["height"]);
			_P("ParamList","像素总数",strArg["colors"].length);
			for(i = 0; i < strArg["colors"].length;i++)
			{
				_C("ColorTable",strArg["colors"][i]["index"],strArg["colors"][i]["color"],strArg["colors"][i]["count"]);
			}
			_M("ImgBottom",strArg["title"] + "_底图.bmp",800,strArg["bottomPic"]["height"]*800/strArg["bottomPic"]["width"]);
		}
	}
    
    </script>
	<style type="text/css">
	.Title {
	background-color: #000000;
	color: #FFFFFF;
	padding: 4px;
	font-weight: bold;
	margin: 10px;
}
    .ColorTable {
	border-radius: 2;
	margin: 0;
	padding: 0;
	border: 1px solid #000000;
	border-spacing: 0px 0px;
}
    body center div {
}
    .ColorTitle {
	color: #FFFFFF;
	background-color: #000000;
	font-weight: bold;
	text-align: center;
	margin:10px;
}
    .boder {
	border: 10px solid #000000;
	padding: 2px;
	margin: 10px;
	background-color: #FFFFFF;	
}
    </style>

	</head>
	<body>
	<center>
	<div id="PrjTitle" class="Title"></div> 
	<div id="CreateTime"></div>
	<div id="OrginTitle" class="Title"></div> 	
	<div id="OrignSize"></div>
	<div><img id="ImgOrign" src="" class="boder"/></div>
	<div id="MixTitle" class="Title"></div> 
    <div id="MixSize"></div>
	<img id="ImgMix" src="" class="boder"/>
	<div id="BottomTitle" class="Title"></div> 
    <div>
    <table id="ParamList" width="600px"  class="ColorTable">
    <tr class="ColorTitle">
    <td>指标</td>
    <td>值</td>   
    </table>
    </div>
    <div>
    <table id="ColorTable" width="600px" class="ColorTable">
    <tr class="ColorTitle">
    <td>编号</td>
    <td>颜色</td>
    <td>颜色值</td>    
    <td>数量</td>
    </tr>
    </table>
    </div>
    <img id="ImgBottom" src="" class="boder"/>
	</center>
	</body>
</html>	
